import request from "@/api/request";
import { apiClusterJava } from "@/api/root";

// 我的会员详情
export const getPersonAllRights = (data) => {
  return request.webservice(
    "mp",
    `${apiClusterJava}/api-yp/open/index`,
    "/rightOpen/getPersonAllRights",
    data
  );
};
//开通会员
export const openVersionRights = (data) => {
  return request.webservice(
    "mp",
    `${apiClusterJava}/api-yp/open/index`,
    "/rightOpen/openVersionRights",
    data
  );
};
//获取子账号管理详情
export const personRightsAccountList = (data) => {
  return request.webservice(
    "mp",
    `${apiClusterJava}/api-yp/open/index`,
    "/rightOpen/personRightsAccountList",
    data
  );
};
//激活码开通会员权益
export const openYltByInviteCode = (data) => {
  return request.webservice(
    "mp",
    `${apiClusterJava}/api-yp/open/index`,
    "/rightOpen/openYltByInviteCode",
    data
  );
};
//职业VIP ，和上面的VIP不是同一个
export const getMySubscribeStatus = (data) => {
  return request.webservice(
    "cr",
    `${apiClusterJava}/api-career/open/index`,
    "/personSubscribe/getMySubscribeStatus",
    data
  );
};
//领取VIP
export const receiveSubscribe = (data) => {
  return request.webservice(
    "cr",
    `${apiClusterJava}/api-career/open/index`,
    "/personSubscribe/receiveSubscribe",
    data
  );
};
//查询是否有未读的订阅消息
export const getMyUnreadMessageStatus = (data) => {
  return request.webservice(
    "cr",
    `${apiClusterJava}/api-career/open/index`,
    "/messageSubscribe/getMyUnreadMessageStatus",
    data
  );
};
//获取我的订阅消息列表
export const getMyMessageList = (data) => {
  return request.webservice(
    "cr",
    `${apiClusterJava}/api-career/open/index`,
    "/messageSubscribe/getMyMessageList",
    data
  );
};
//检测职位是否支持分享获取vip
export const checkShareVipAvailable = (data) => {
  return request.webservice(
    "cr",
    `${apiClusterJava}/api-career/open/index`,
    "/subscribeManage/checkShareVipAvailable",
    data
  );
};
